3.2453 \(\int x (a+b x^n) \, dx\)

Optimal. Leaf size=21 \[ \frac{a x^2}{2}+\frac{b x^{n+2}}{n+2} \]

[Out]

(a*x^2)/2 + (b*x^(2 + n))/(2 + n)

________________________________________________________________________________________

Rubi [A]  time = 0.0071917, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {14} \[ \frac{a x^2}{2}+\frac{b x^{n+2}}{n+2} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*x^n),x]

[Out]

(a*x^2)/2 + (b*x^(2 + n))/(2 + n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int x \left (a+b x^n\right ) \, dx &=\int \left (a x+b x^{1+n}\right ) \, dx\\ &=\frac{a x^2}{2}+\frac{b x^{2+n}}{2+n}\\ \end{align*}

Mathematica [A]  time = 0.0130265, size = 21, normalized size = 1. \[ \frac{a x^2}{2}+\frac{b x^{n+2}}{n+2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*x^n),x]

[Out]

(a*x^2)/2 + (b*x^(2 + n))/(2 + n)

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 23, normalized size = 1.1 \begin{align*}{\frac{b{x}^{2}{{\rm e}^{n\ln \left ( x \right ) }}}{2+n}}+{\frac{a{x}^{2}}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*x^n),x)

[Out]

b/(2+n)*x^2*exp(n*ln(x))+1/2*a*x^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*x^n),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.55751, size = 61, normalized size = 2.9 \begin{align*} \frac{2 \, b x^{2} x^{n} +{\left (a n + 2 \, a\right )} x^{2}}{2 \,{\left (n + 2\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*x^n),x, algorithm="fricas")

[Out]

1/2*(2*b*x^2*x^n + (a*n + 2*a)*x^2)/(n + 2)

________________________________________________________________________________________

Sympy [A]  time = 0.229533, size = 51, normalized size = 2.43 \begin{align*} \begin{cases} \frac{a n x^{2}}{2 n + 4} + \frac{2 a x^{2}}{2 n + 4} + \frac{2 b x^{2} x^{n}}{2 n + 4} & \text{for}\: n \neq -2 \\\frac{a x^{2}}{2} + b \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*x**n),x)

[Out]

Piecewise((a*n*x**2/(2*n + 4) + 2*a*x**2/(2*n + 4) + 2*b*x**2*x**n/(2*n + 4), Ne(n, -2)), (a*x**2/2 + b*log(x)
, True))

________________________________________________________________________________________

Giac [A]  time = 1.43798, size = 39, normalized size = 1.86 \begin{align*} \frac{2 \, b x^{2} x^{n} + a n x^{2} + 2 \, a x^{2}}{2 \,{\left (n + 2\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*x^n),x, algorithm="giac")

[Out]

1/2*(2*b*x^2*x^n + a*n*x^2 + 2*a*x^2)/(n + 2)